<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>{$title}</title>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">
    <link href="/static/css/blog_index/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/static/css/blog_index/base.css" rel="stylesheet" type="text/css">
    <link href="/static/css/blog_index/toastr.min.css" rel="stylesheet" type="text/css">
   
    <script src="/static/js/blog_index/jquery-1.9.1.min.js"></script>
    <script src="/static/js/blog_index/toastr.min.js"></script>
    <!--[if lt IE 9]>
    <script src="./static/js/blog/js/html5.js"></script>
    <script type="text/javascript" src="./static/js/blog/selectivizr-min.js"></script>
    <![endif]-->
    <!--[if lt IE 7]>
    <script src="./static/js/blog/js/minmax.js"></script>
    <![endif]-->
    <script type="text/javascript" src="/static/js/blog_index/picobox.js"></script>
    <script type="text/javascript" src="/static/js/blog_index/picobox_beauty.js"></script>
    <link rel="stylesheet" href="/static/css/blog_index/picobox.css" type="text/css"/>
    <link rel="stylesheet" href="/static/css/blog_index/picobox_beauty.css" type="text/css"/>
    <script language="javascript">
        function doCheck(ischecked) {
            $('input.mch').each(function (i) {
                this.checked = ischecked;
            });
        }
        function getChecked() {
            var ids = '';
            $('input.mch').each(function (i) {
                if (this.checked) {
                    ids += this.value + ',';
                }
            });
            if (ids != '') {
                ids = ids.substr(0, ids.length - 1);
            }
            return ids;
        }
        function confirmDel() {
            var ids = getChecked();
            if (ids.length == '') {
                alert('请选择要删除的记录。');
                return false;
            }
            if (!confirm('真的要删除选中的记录吗？')) {
                return false;
            }
            return true;
        }
        function welcomeText(username) {
            var time = ['子时', '丑时', '寅时', '卯时', '辰时', '巳时', '午时', '未时', '申时', '酉时', '戌时', '亥时'];
            var text = ['夜半销魂，谁人歌', '雄鸡未鸣，身未起', '风雨如晦，平旦出', '旭日东升，无往复', '君子勿劳，朝食饱', '鸡栖于莳，河清定', '善行无迹，恒德足', '日过中天，骄未散 ', '哺鹊进食，斜阳归', '鸡栖于埘，日沉坡', '日暮将至，归田园', '人定归本，早安眠'];
            var arr_week = ['', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
            hour = new Date().getHours();
            year = new Date().getFullYear();
            month = new Date().getMonth();
            dayx = new Date().getDate();
            monthx = month + 1;
            week = arr_week[new Date().getDay()];

            hourx = Math.ceil(hour / 2);
            if (hourx == 12) {
                hourx = 0;
            }
            var today = year + "年" + monthx + "月" + dayx + "日 " + week;
            second = new Date().getSeconds();
            if (second % 2 == 0) {
                welcome = "<span class=\"greeting\" title=\"" + today + "\"><strong></strong>&nbsp;&nbsp;</span>";
            }
            else {
                welcome = "<span class=\"greeting\" title=\"" + today + "\"><strong>" + time[hourx] + "</strong>&nbsp;&nbsp;" + text[hourx] + "</span>";
            }
            return welcome;
        }
    </script>
</head>
<body>
<div class="header">
    <div class="header-inner">
        <div class="user-info">
            <div class="user-avatar">
      					<span class="pie" title="">
      						<a href="/index">
      							<img src="/static/images/avatar_12855194_96.jpg" alt="" class="pie">
      						</a>
      					</span>
            </div>
            <h2 class="user-name">{$_SESSION['name']} &nbsp;<a
                    href='http://passport.blogbus.com/logout?goto=http%3A%2F%2Fhome.blogbus.com%2Flogout'
                    style='color:#666'>退出</a></h2>
            <p id="prompt-msg">
                <script type="text/javascript">document.write(welcomeText("blogbus_ncIE4037"))</script>
            </p>
        </div>
        <div class="utilities">
            <ul>
                <li class="dashboard"><a href="{:url('index/User/')}"><span class="pie icon"><span class="pie indicator" id="msgcount">0</span></span>管理中心</a>
                </li>
                <li class="new-entry"><a href="{:url('index/blog/newblog')}"><span class="pie icon"></span>新日志</a></li>
                <li class="blog-list"><a href="{:url('index/blog/index')}"><span class="pie icon"></span>博客</a></li>
                <li class="album-list"><a href="{:url('index/Album/index')}"><span class="pie icon"></span>相册</a></li>
                <li class="friend-list"><a href="{:url('index/Friend/index')}"><span class="pie icon"></span>好友</a></li>
                <li class="events"><a href="#"><span class="pie icon"></span>活动</a></li>
                <li class="vip"><a href="{:url('index/vip/index')}"><span class="pie icon"></span>VIP</a></li>
                <li class="home"><a href="{:url('index/index/index')}"><span class="pie icon"></span>首页</a></li>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
    (function () {
        $('#allSubMenus').css('display', 'none');
        var _menuEff = {};
        _menuEff.cur = null;
        function switchMenu(id) {
            var menu_html = (_menuEff.cur.hasClass('menuBlogClass') && id == 'menuBlog' && menu) ? menu : $('#allSubMenus #' + id).html();
            $('#appSubMenuBlock').html(menu_html).css('paddingLeft', $('#allSubMenus #' + id).css('paddingLeft'));
        }

        $('ul.menus li').hover(function (e) {
                    _menuEff.cur = _menuEff.cur || $('ul.menus li.actived');
                    $('ul.menus li').removeClass('actived');
                    var id = 'menu' + this.className.match(/menu(\w+)Class/)[1];
                    switchMenu(id);
                    $(this).addClass('actived');
                },
                function (e) {
                    if (e.relatedTarget.tagName != 'DIV') {
                        return;
                    }
                    if (_menuEff.cur && !$(e.relatedTarget).hasClass('subMenus')) {
                        $('ul.menus li').removeClass('actived');
                        _menuEff.cur.addClass('actived');
                        var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                        switchMenu(id);
                    }
                });
        $('div.mainNavi').mouseout(function (e) {
            if (_menuEff.cur && e.relatedTarget.id == 'wrapper') {
                $('ul.menus li').removeClass('actived');
                _menuEff.cur.addClass('actived');
                var id = _menuEff.cur[0].className.match(/(menu\w+)Class/)[1];
                switchMenu(id);
            }
        });
    })();
    //$('#header').append('<div class="new"></div>');
</script>

<!--main start-->
<style>
    <!--
    .utilities ul li.blog-list:before {
        z-index: 1;
        content: '';
        position: absolute;
        left: 40%;
        top: 84%;
        width: 0px;
        height: 0px;
        border-style: solid;
        border-width: 7px;
        border-color: transparent transparent #90c044 transparent;
    }

    /*...伪元素实现三角...*/

    .utilities ul li.blog-list a {
        color: #90c044;
    }

    .utilities ul li.blog-list a .icon {
        background-color: #90c044;
    }

    -->
</style>
<link href="/static/css/blog_index/blog.css" rel="stylesheet" type="text/css">
<div class="nav">
    <div class="container">
        <ul>
            <li class="xinrizhi"><a href="/blog/newblog" class="pie">写新日志</a></li>
            <li class="rizhi"><a href="/blog" class="pie">日志</a></li>
            <li class="pinlun"><a href="/blog/comment" class="pie">评论</a></li>
            <li class="fenglei"><a href="/blog/category" class="pie">分类</a></li>
            <li class="biaoqian"><a href="/blog/tag" class="pie">标签</a></li>
            <li class="lianjie"><a href="/blog/link" class="pie">友情链接</a></li>
            <li class="shezhi"><a href="/blog/set" class="pie">博客设置</a></li>
            <li class="tongji"><a href="/blog/count" class="pie">访问统计</a></li>
            <li class="quanbu"><a href="{:url('index/blog/allblog')}" class="pie">全部博客</a></li>
        </ul>
    </div>
</div>
{block name="main"}
<script type="text/javascript">

    $('a.submenuPost').addClass('actived');

</script>


<style type="text/css">

    .nav ul li.rizhi a {

        background: #fff;

        color: #90c044;

        -webkit-border-radius: 5px 5px 0 0;

        -moz-border-radius: 5px 5px 0 0;

        border-radius: 5px 5px 0 0;

    }

</style>


<div class="container">

    <div class="content">

        <div class="current-blog">

            <!-- 当前博客：<a href="#" target="_blank">Bus公告</a> <span class="switch-blogs"><a href="#">[切换博客]</a></span> -->

            <span class="subCurrent">
	<div style='float:left'>
	当前博客：<a title="在新窗口中查看：jay (http://wwwjay.blogbus.com" class="pub_blogName01" target="_blank"
            href="http://wwwjay.blogbus.com">jay</a>
	</div>
	<div style='float:left;margin-left:10px'>
		<a id="switch_blog" onclick="toggleMenu('#dm_changeBlog')" title="切换当前博客" class="pub_subLink"
           href="javascript:void(0)">[切换博客]</a>
		<ul style="display: none;" class="pub_dropmenu change_blog" id="dm_changeBlog">
			
			<li><a onclick="hideMenu('#dm_changeBlog');return false;" href="/7234385/posts/posts">
				jay</a></li>
			
		</ul>
	</div>
	<script type="text/javascript">
	function toggleMenu(selector) {
        $(selector).slideToggle('fast');
    }
	</script>
</span>
        </div>

        <div class="blog-submenus pub_subMenu">

            <a href="/7234385/posts/?status=" class="actived">全部日志</a> | <a href="/7234385/posts/?status=0">已隐藏</a> |

            <a href="/7234385/posts/pedding">待审核</a> | <a href="/7234385/posts/drafts">草稿</a>

            <span class="categories">

	          <form method="get">

				<select name="cate">
        <option value="">查看全部分类</option>
        </select>              <!--	<div class="pub_Search01" style="float:right">-->

                  <!--  <input name="q" type="text" class="searchText"  /><input type="submit" value="" class="searchButton" />-->

                  <!--  </div>-->

			    </form>

		    </span>

        </div>

        <form method="post" name="formPost" id="frm_post"><input name="REQUEST_METHOD" value="PUT" type="hidden"/>
            <table cellspacing="0" class="data-table pub_list01 pri_blogPostList">

                <thead>

                <tr>

                    <th width="3%" class="first-col">&nbsp;</th>

                    <th width="34%" class="second-col">标题</th>

                    <th width="17%">分类</th>

                    <th width="13%">作者</th>

                    <th width="7%">评论</th>


                    <th width="12%" class="last-col">日期</th>
                    <th width="12%" class="last-col">操作</th>

                </tr>

                </thead>

                <tbody>

                {if condition="$list == null"}
                <tr> <td colspan="7" >目前还没有日志,快去写一个吧</td></tr>
                {else/}
                {foreach $list as $v}
                <tr>

                    <td class="first-col"><input type="checkbox" class="mch" name="id[]" value="337119739"/></td>

                    <td class="align-left PLtitle">

                        <img class="status" _id="337119739" _status="-3"

                             title="更改状态"

                             src="/static/images/icon_-3.gif"/>

                        <a href="/7234385/posts/337119739/form" title="点击编辑《第二次》">{$v['title']}</a>

                        <span class="quick" style="display: none;"><a title="在新窗口查看" target="_blank"
                                                                      href="http://www.blogbus.com/wwwjay-logs/337119739.html">查看</a></span>

                        <span class="quick_verify" style="display: none;" _status="-3">&nbsp;&nbsp;（<a
                                href="/7234385/posts/pedding?submit=yes">提交审核</a>）</span>

                    </td>
                    <td><a href="">分类</a></td>
                    <td><a href="?author=12855194">{$v['author']}</a></td>
                    <td><a href="">评论次数</a></td>

                   

                    <td><a href="">{$v['post_time']}</a></td>
                    <td><button data-id="{$v['id']}" class="btn btn-danger btn-xs del-btn">删除</button></td>
                </tr>
                {/foreach}
                </tbody>

                <tfoot>

                <tr>
                    {/if}
                    <th><input id="check_all" type="checkbox" class="checkbox" onclick="doCheck(this.checked)"/></th>

                    <td colspan="6" class="align-left">

                        <span><a href="javascript:void(0);" onclick="doCheck(true)">全选</a></span>

                        <span>

            		<a href='javascript:void(0)' id="btn_del">删除</a>&nbsp;&nbsp;

            	</span>

                        <span class="categories">  <select name="cate_id">
        <option value="">转移到分类</option>
        </select></span>

                    </td>

                </tr>

                </tfoot>

            </table>

        </form>

        <div class="paginator">

            <span class='pager'><span class="total">共0页</span> <span class="pages"></span></span></div>


    </div>

</div>


<script type="text/javascript">
    //点击删除按钮提示是否删除文章
    $('.del-btn').click(function(){
        var ac_id = $(this).attr('data-id');
        if(confirm('您确定要删除文章吗')){
            var obj = $(this).parents('tr');
            delAjax(ac_id , obj);
        }
    });
    //执行ajax删除操作
    function delAjax(id , obj){
        $.ajax([
                type:'get',
                url:'/blog/deleteArt/'+ id,
                dataType:'json',
                success : function(data){
                	if (data.status) {
                		toastr.success(data.info);
                		obj.remove();

                	}else{
                		toastr.error(data.info);
                	}
                },
                error: function(data){
                	alert('请求失败');
                }


        ]);
    }


    $('td.PLtitle').hover(function () {
        $(this).find('.quick').show()
    }, function () {
        $(this).find('.quick').hide()
    });

    $('table.pub_list01 tbody tr:odd').addClass('odd');

    var blog_id = 7234385;

    var cate = 0;

    $('select[name=cate]').val(cate).change(function () {
        $(this).parent('form').submit()
    });

    var status = "";

    $('div.pub_subMenu a[class=st_' + status + ']').wrapInner("<strong></strong>")

    $('img.status').click(function () {

        var old_status = $(this).attr('_status');

        var id = $(this).attr('_id');

        var new_status = 1;

        if (old_status == 0) {

            new_status = 1;

        } else if (old_status > 0 || old_status == -2) {

            new_status = 0;

        } else {

            return false;

        }

        if (new_status == 0 && !confirm("要隐藏这篇日志吗？\n此操作将使该日志不显示在Blog页面上")) {

            return false;

        }

        var img = $(this);

        $.ajax({

            'url': '/' + blog_id + '/posts/' + id + '/post_status',
            'data': 'status=' + new_status,
            'type': 'PUT',
            'dataType': 'json',
            'success': function (ret) {

                if (ret.success) {

                    img.attr({

                        'src': "http://q.blogbus.com/imgs/icon_" + ret.success.status + ".gif",

                        '_status': new_status

                    });

                }

            },

            'error': function (xhr, status) {

                var ret = (new Function('return ' + xhr.responseText))();

                if (ret.failure.message) {

                    alert(ret.failure.message);

                }

            }

        });

        return false;

    });


    $('#btn_del').click(function () {

        if (!confirm('日志删除后将无法找回，确实要删除这些日志吗？')) {

            return;

        }

        var f = $('#frm_post');

        f.attr('action', '/' + blog_id + '/posts');

        f[0].REQUEST_METHOD.value = 'DELETE';

        f.submit();

    });

    $('select[name=cate_id]').change(function () {

        var cate_name = $('select[name=cate_id] option:selected').text();

        if ($('select[name=cate_id]').val() == '') {

            return;

        }

        if (!confirm('确实要将这些日志移动到分类 “' + cate_name + '” 吗？')) {

            return;

        }

        var f = $('#frm_post');

        f.attr('action', '/' + blog_id + '/posts/post_category');

        f[0].REQUEST_METHOD.value = 'PUT';

        f.submit();

    });

    /** quick_verify */

    $(".quick_verify[_status='-3']").show();

    $(".quick_verify[_status='-3'] a").css("color", "#6BB044");

</script>


<script type="text/javascript" src="/static/other/.com/msg_count"></script>
<script type="text/javascript">
    $('body').click(function (e) {
        if (!$(e.target).hasClass('pub_subLink') && !$(e.target).parents().hasClass('pub_dropmenu')) {
            $('.pub_dropmenu').slideUp('fast');
        }
    })
</script>
<!--main end--><!--}
	<footer class="footer">
  			<div class="copyright">&copy; 2002 - 2017 BlogBus.com, All Rights Reserved. 博客大巴 版权所有
  			  	<a href="javascript:void(0)" onclick="Picobox.showIFrameBox('反馈意见','http://home.blogbus.com/feedback?url=http%3A%2F%2Fblog.home.blogbus.com%2Fposts',{width:400,height:200});">反馈意见</a>
  			</div>
	</footer>
	-->
{/block}
<div id="footer" class="footer">
    <div class="utilityMenu">
        <a target="_blank" href="http://news.blogbus.com/">媒体报道</a>&nbsp;|&nbsp;
        <a target="_blank" href="http://www.blogbus.com/about/about.html">关于我们</a>&nbsp;|&nbsp;
        <a target="_blank" href="http://www.blogbus.com/about/jobs/jobs.html">工作机会</a>&nbsp;|
        &nbsp;<a target="_blank" href="http://www.blogbus.com/about/blogserviceterm.html">相关法律</a>&nbsp;|
        &nbsp;<a target="_blank" href="http://www.blogbus.com/about/adservice.html">广告服务</a>&nbsp;|
        &nbsp;<a target="_blank" href="http://passport.blogbus.com/register_form">申请博客</a>&nbsp;|&nbsp;
        <a target="_blank" href="http://www.blogbus.com/about/sitemap.html">网站地图</a>&nbsp;|&nbsp;<a target="_blank"
                                                                                                    href="http://www.blogbus.com/about/partners.html">合作伙伴</a>
    </div>
    <div class="copyright">&copy; 2002-2017 BlogBus.com, All Rights Reserved. 博客大巴 版权所有 沪ICP B2-20080056号 <a
            href="javascript:void(0)"
            onclick="Picobox.showIFrameBox('反馈意见','http://home.blogbus.com/feedback?url=http%3A%2F%2Fblog.home.blogbus.com%2Fposts',{width:400,height:200});">反馈意见</a>
    </div>
</div>
<div class="ajaxInfo msg_success" style="display:none;" id="flashMessage">
    <div class="message"></div>
</div>
<script type="text/javascript">
    function showFlashMessage(message) {
        el = $('#flashMessage .message');
        el.html(message);
        $('#flashMessage').fadeIn();
        setTimeout(function () {
            $('#flashMessage').fadeOut('fast')
        }, 3000);
    }
</script>

<!--帮助-->
<div class="pie page-help">
    <div class="pie help-inner">
        <ul>
            <li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514506.html">分类筛选，管理更便捷</a></li>
            <li><a target="_blank" href="http://bangzhuzhongxin.blogbus.com/logs/4514503.html">隐藏/显示单篇日志</a></li>
        </ul>
    </div>
</div>
<div style="display:none;">
</div>
<div style='display:none'>
    <script type="text/javascript">
        var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
        document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F8452dbf205b0f6608661b0fdea22c741' type='text/javascript'%3E%3C/script%3E"));
        var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
        document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F66e39c4b330e47cc1e523676f29c6402' type='text/javascript'%3E%3C/script%3E"));

    </script>
</div>
</body>
</html>

